package com.googlecode.animator.data.markers
{
	import com.googlecode.animator.data.IValueObject;
	import com.googlecode.animator.data.ValueObject;
	
	public class BaseMarker extends ValueObject
	{
		public var object3DName:String;
		
		public var id:String;
		
		override public function clone(src:* = null):IValueObject
		{	
			if(src == null)
			{
				throw(new Error("BaseMarker cannot be cloned. Use one of its subclasses."));
			}
			src.object3DName = this.object3DName;
			src.id = this.id;		

			return src;					
		}
		
		override public function toXML(src:XML = null):XML
		{
			if(src == null)
			{
				src = new XML(<marker id={this.id}></marker>);
			}
			src.@id = this.id;
			//src.appendChild(<object3DName>{this.object3DName}</object3DName>);
			
			return src;
		}
		
		override public function fromXML(src:XML):void
		{
			this.id = src.@id;
			//this.object3DName = src.object3DName;
		}

	}
}